<template>
    <div class="projectInfo">
        <div class="item" style="margin-left:30px;">
            <div class="item-title"><div style="font-size:32px;font-weight:400">{{data.name}}</div></div>
            <div class="item-content" style="text-indent:2em">{{data.consContent}}</div>
        </div>
        <div class="item">
            <div class="sign"></div>
            <div class="item-title"><div><span style="border-left: 12px solid #4F9CEE;padding-left: 18px;">基本信息</span></div></div>
            <div class="item-content">
                <dl class="subItem" style="float:left">
                     <dt class="subItem-title">计划投资额(万元)</dt>
                    <dd class="subItem-content">{{data.planInvestment}}</dd>
                    <dt class="subItem-title">截至上一年完成投资(万元)</dt>
                    <dd class="subItem-content">{{data.lastyearInvestment}}</dd>            
                </dl>
                <dl class="subItem" style="float:right">
                     <dt class="subItem-title">建设内容</dt>
                    <dd class="subItem-content">{{data.consContent}}</dd>
                    <dt class="subItem-title">是否为重点项目</dt>
                    <dd class="subItem-content">{{data.isImportant}}</dd>
                   
                </dl>
            </div>
        </div>

    </div>
</template>
<script>
    import date_formate from "../tool/Global/dateutil.js";
    import {queryProYearScheduleByPkid,queryProjectdetailByPkid} from "../tool/Global/app-mgr.js";
    export default {
        props:["progressId"],
        data:function() {
            return {
                data:{},
            }
        },
        mounted:function(){
            let ref = this;
            this.$nextTick(function () {
                ref.getYearInfoByPjtId();
            })
        },
        methods:{
            getYearInfoByPjtId(){
                let ref = this;
                queryProYearScheduleByPkid(ref.progressId).then(function(result){
                    if(result.data.success){
                        ref.data = result.data.data;
                        if(ref.data.dateYear){
                            ref.data.dateYear = date_formate.format(new Date(ref.data.dateYear),"yyyy");
                        };
                        ref.data.isImportant = ref.data.isImportant==1?"是":"否";
                        var  proId =ref.data.projectID;
                        queryProjectdetailByPkid(proId).then(function(result){
                            var name = result.data.data.name+ref.data.dateYear+"年计划";
                            ref.$set(ref.data,"name",name)
                            
                        })
                    }else{
                        ref.$message(result.data.message);
                    }
                })
            }
        }
    }
</script>
<style scoped>
    .projectInfo{
        height:400px;
        overflow: auto;
        border: 1px solid #9E9E9E;
    }
    .subItem{
        margin-left: 30px;
        width: 562px;
    }
    .item-title{
        clear: both;
        font-size: 20px;
        color:black;
        font-weight: 700;
        height: 60px;
        line-height: 60px;
        background-image:url(../../assets/paraTitle-line.png);
        background-position-y: 17px;
        background-repeat-y: no-repeat;
    }
    .item-title div{
        height: 60px;
        line-height: 60px;
        float: left;
        background-color:#fff;
        font-size: 22px;
        font-weight: 400
    }
    .item-content{

        margin-top: 15px;
        margin-bottom: 15px;
        font-size: 14px;
        overflow: hidden;
    }
    ul li{  
        list-style-type:none;  
    }
    .subItem-content{
        font-size: 18px;
        /* border: 1px dashed; */
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        height: 26px;
        line-height: 26px;
        font-size: 12px;
        color: #333;
    }
    .jianbao{
        cursor:pointer;
        margin-bottom: 10px;
        float:left
    }
    .subItem-title{
        font-size: 18px;
        padding-right: 20px;
        float: left;
        clear: both;
        /* border: 1px dashed; */
        
        height: 26px;
        line-height: 26px;
        font-size: 12px;
        color: #999;
    }
</style>





